<div id="account-record-form-panel">
	<div class="hd">Account - Add Income</div>
	<div class="bd">
		<form method="POST" action="account.php?add&type=in">
			<div class="x-form-item">
				<label for="amount">Amount:</label>
				
				<div>
					<input type="text" name="amount" />
				</div>
				
				<div class="clear"></div>
			</div>
				
			<div class="x-form-item">
				<label for="description">Description:</label>
				<input type="text" name="description" />
					
				<div class="clear"></div>
			</div>
				
			<div class="x-form-item">
				<label for="date">Date:</label>
				<input type="text" name="date" id="calendar-input" class="lite calendar-input" />		
				<button id="calendar-button" class="calendar-button">Select</button>
		
				<div id="canlendar-container" class="canlendar-container">
					<div class="bd"></div>
				</div>
				<div class="clear"></div>
			</div>
								
			<div class="x-form-item">
				<label for="category">Category:</label>
				<select id="category-select" name="category" class="category-select">
					<?php foreach($accountCategory["in"] as $row) { ?>
					<option value="<?php echo $row["category"]; ?>"><?php echo $row["category"]; ?></option>
					<?php } ?>
				</select>					
				<button id="category-button" class="category-button">Add</button>
					
				<div class="clear"></div>
			</div>
								
			<div class="x-form-item">
				<label for="tag">Tags:</label>
				<input type="text" name="tag" />
					
				<div class="clear"></div>
			</div>
				
			<div class="x-form-item">
				<label for="detail">Detail Information:</label>
				<textarea name="detail" rows="10"></textarea>
			</div>
			
			<div class="x-form-item">
				<input type="hidden" name="type" value="in" />
			</div>
		</form>
			
	</div>
	<div class="ft">
		<span>Add account record</span>
	</div>
	
	<div class="sp" style="display: none;">
		<div class="account-record-category-panel">
			<div class="hd">Add a category</div>
			<div class="bd">
				<input class="category-input" type="text" />
				<button class="category-ok-button">OK</button>
			</div>
			<div class="ft">Enter the category name, then press "OK"</div>
		</div>		
	</div>
</div>
	
<div id="account-in-dialog-template">
	<div class="hd">Account - Add Income</div>
	<div class="bd">
		<form method="POST" action="account.php?add&type=in">
			<div class="x-form-item">
				<label for="amount">Amount:</label>
				
				<div>
					<input type="text" name="amount" />
				</div>
				
				<div class="clear"></div>
			</div>
				
			<div class="x-form-item">
				<label for="description">Description:</label>
				<input type="text" name="description" />
					
				<div class="clear"></div>
			</div>
				
			<div class="x-form-item">
				<label for="date">Date:</label>
				<input type="text" name="date" id="add-in-date-input" class="lite" />
		
				<button id="add-in-calendar-button">Select</button>
		
				<div id="add-in-canlendar">
					<div class="bd"></div>
				</div>
				<div class="clear"></div>
			</div>
								
			<div class="x-form-item">
				<label for="category">Category:</label>
				<select id="account-in-select" name="category">
					<?php foreach($accountCategory["in"] as $row) { ?>
					<option value="<?php echo $row["category"]; ?>"><?php echo $row["category"]; ?></option>
					<?php } ?>
				</select>
					
				<button id="add-in-catalog-button">Add</button>
					
				<div class="clear"></div>
			</div>
								
			<div class="x-form-item">
				<label for="tag">Tags:</label>
				<input type="text" name="tag" />
					
				<div class="clear"></div>
			</div>
				
			<div class="x-form-item">
				<label for="detail">Detail Information:</label>
				<textarea name="detail" rows="10"></textarea>
			</div>
		</form>
			
	</div>
	<div class="ft"></div>
</div>

<div id="account-out-dialog-template">
	<div class="hd">Account - Add Expenditure</div>
	<div class="bd">
		<form method="POST" action="account.php?add&type=out">
			<div class="x-form-item">
				<label for="amount">Amount:</label>
					
				<div>
					<input type="text" name="amount" />
				</div>
					
				<div class="clear"></div>
			</div>
				
			<div class="x-form-item">
				<label for="description">Description:</label>
				<input type="text" name="description" />
					
				<div class="clear"></div>
			</div>
				
			<div class="x-form-item">
				<label for="date">Date:</label>
				<input type="text" name="date" id="add-out-date-input" class="lite" />
		
				<button id="add-out-calendar-button">Select</button>
		
				<div id="add-out-canlendar">
					<div class="bd"></div>
				</div>
				<div class="clear"></div>
			</div>
								
			<div class="x-form-item">
				<label for="category">Category:</label>
				<select id="account-out-select" name="category">
					<?php foreach($accountCategory["out"] as $row) { ?>
					<option value="<?php echo $row["category"]; ?>"><?php echo $row["category"]; ?></option>
					<?php } ?>
				</select>
					
				<button id="add-out-catalog-button">Add</button>
					
				<div class="clear"></div>
			</div>
								
			<div class="x-form-item">
				<label for="tag">Tags:</label>
				<input type="text" name="tag" />
					
				<div class="clear"></div>
			</div>
				
			<div class="x-form-item">
				<label for="detail">Detail Information:</label>
				<textarea name="detail" rows="10"></textarea>
			</div>
		</form>
	</div>
	<div class="ft"></div>
</div>